package com.fz.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * Created by xiao zeng on 2017/7/3.
 */

@Component @Data
public class StudentInfo {

    @Autowired
    private Student student;

    @PostConstruct
    public void inin(){
        System.out.println("++++++++初始化");
    }
    public void show(){
        System.out.println(student.getName()+"++++++++++++"+student.getId());
    }

    @PreDestroy
    public void doty(){
        System.out.println("销毁");
    }
}
